home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group95b.txt / 000154_icon-group-sender _Wed Sep 13 09:22:41 1995.msg < prev    next >
Internet Message Format  |  1995-09-18  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Wed, 13 Sep 1995 09:02:48 MST
  2. Date: Wed, 13 Sep 1995 09:22:41 -0400
  3. From: motto@srd2000.srd.census.gov (Mark Otto)
  4. Message-Id: <9509131322.AA10139@srd2000>
  5. To: icon-group@cs.arizona.edu
  6. Subject: Problem with decode
  7. Content-Length: 1822
  8. Errors-To: icon-group-errors@cs.arizona.edu
  9.  
  10. I am using encode and decode (from the IPL) to read and write records
  11. of a database with a complicated record structure.  These routines are
  12. very useful because once I create the structures, I can decode or read
  13. them easily and use the records in a number of different programs.
  14. Unfortunately when I work with a large number of records (around 800),
  15. I get run-time errors.
  16.  
  17. Run-time error 302
  18. File codeobj.icn; Line 220
  19. memory violation
  20. Trace back:
  21.    derecord("10smembershiplcd...","lcdf") from line 167 in codeobj.icn
  22.    decode("10smembershiplcd...",1) from line 220 in codeobj.icn
  23.    derecord("7slmemberlcdh29R...","lcdg") from line 167 in codeobj.icn
  24.    {create ..} from line 220 in codeobj.icn
  25.  
  26. According to the Icon book, error 302 is a stack overflow, but I am
  27. getting a memory violation.  Is this a problem with the interpreter?
  28. I am running on a Sparc 2000 running Solaris 2.3 and Icon Interpreter
  29. Version 9.0.  July 16, 1994.  In Ralph Griswold's codeobj routine,
  30. statement 220 is creating a coexpression.
  31.  
  32. 218  procedure detable(s,tag)
  33. 219   local t, e
  34. 220   e := create decode(s,1)    # see derecord above; here it's the default
  35. 221                # value that motivates co-expressions.
  36. 222   inlab[tag] := t := table(@e)
  37. 223   while t[@e] := @e
  38. 224   return t
  39. 225 end
  40.  
  41. I assume the coexpression stack is overflowing, but changing the
  42. COEXPSIZE environmental variable doesn't change the error or where the
  43. error occurs.  Has anyone else had similiar experiences with these
  44. routines?  I need help diagnosing this problem.
  45.  
  46. Thanks for your help.
  47. Mark Otto                       e-mail:  Mark.Otto@Census.GOV (at the smtp gateway)
  48. Census Bureau, Rm 3000-4 (SRD)           otto@asgard.umd.edu
  49. Washington, DC  20233-9100      office:  301-457-4728  fax:     301-457-2299
  50.                                 home:    301-431-1838
  51.  
  52. :wq
  53.